package com.share.book.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.share.book.mapper.EntryMapper;
import com.share.book.domain.Entry;
import com.share.book.service.IEntryService;

/**
 * 文档列表Service业务层处理
 *
 * @author atguigu
 * @date 2025-10-13
 */
@Service
public class EntryServiceImpl extends ServiceImpl<EntryMapper, Entry> implements IEntryService
{
    @Autowired
    private EntryMapper entryMapper;

    /**
     * 查询文档列表列表
     *
     * @param entry 文档列表
     * @return 文档列表
     */
    @Override
    public List<Entry> selectEntryList(Entry entry)
    {
        return entryMapper.selectEntryList(entry);
    }

    /**
     * 根据id查询文档列表
     * @param id
     * @return
     */
    @Override
    public Entry getById(Long id) {
        return entryMapper.selectById(id);
    }

    @Override
    public boolean updateById(Entry entry) {
        return entryMapper.updateById(entry) > 0;
    }

    @Override
    public boolean save(Entry entry) {
        return entryMapper.insert(entry) > 0;
    }

    @Override
    public boolean deleteBatchByIds(List<Long> id) throws Exception {
        return entryMapper.deleteBatchIds(id) > 0;
    }

}
